package main

import (
	"fmt"
	"math/rand"
	"runtime"
	"time"
)

func main() {
	var count int = 0
LABLE:
	for {
		//设置随机种子
		rand.Seed(time.Now().UnixNano())
		//生成随机数|[0,100)
		n := rand.Intn(100) + 1
		count++
		if n == 99 {
			fmt.Println("运行次数 ", count)
			break LABLE
		}
	}
	runtime.GC()
}
